/*
 * i2c_support.h
 *
 *  Created on: Feb 28, 2013
 *      Author: Kurt Hardin
 */

#ifndef I2C_SUPPORT_H_
#define I2C_SUPPORT_H_

#include "support_common.h"

// MFC52233 I2C init
void mcf52233_i2c_init(void);

// Reads a single byte from the specified slave I2C bus.
uint8 mcf52233_i2c_read(uint8 slave_addr, uint8 reg_addr);

// Reads multiple consecutive bytes from the specified slave on the I2C bus.
void mcf52233_i2c_read(uint8 slave_addr, uint8 reg_addr, uint8 * data, uint8 bytes);

// Writes a single byte to the specified slave on the I2C bus.
void mcf52233_i2c_write(uint8 slave_addr, uint8 reg_addr, uint8 data);

// Writes multiple consecutive bytes to the specified slave on the I2C bus.
void mcf52233_i2c_write(uint8 slave_addr, uint8 reg_addr, uint8 * data, uint8 bytes);

#endif	/* I2C_SUPPORT_H_ */
